/**
 * Created by 大象 on 2018/6/24.
 * 图书相关api
 */
import * as API from './'

export default {

  //查询获取scategory列表(通过page分页)
  findList: params => {
    return API.GET('/api/v1/scategory', params)
  },
  // 树形结构
  tree: params => {
    return API.GET('/api/v1/scategory/tree', params)
  },
  //查询获取一条scategory信息
  findById: id => {
    return API.GET(`/api/v1/scategory/${id}`)
  },

  add: params => {
    return API.POST(`/api/v1/scategory`, params)
  },
  
  update: (id, params) => {
    return API.PUT(`/api/v1/scategory/${id}`, params)
  },
  // 审题状态
  updateOk: (id, params) => {
    return API.PUT(`/api/v1/scategory/isok/${id}`, params)
  },
  //单个删除scategory
  remove: id => {
    return API.DELETE(`/api/v1/scategory/${id}`)
  },

  //批量删除，传ids数组
  removeBatch: (ids) => {
    return API.DELETE(`/api/v1/scategory/batch/${ids}`)
  }

}
